#include <iostream>
//对象适配器

class USB
{
public:
    virtual void show()
    {
    std::cout<<"USB接口"<<std::endl;
    }
};

class TypeC
{
public:
    virtual void show()
    {
        std::cout<<"TypeC接口"<<std::endl;
    }
};

//用组合加继承
class Adapter:public USB
{
public:
    void show()
    {
        typec.show();
    }
private:
    TypeC typec;
};
int main()
{
    USB *u = new Adapter;
    u->show();

    return 0;
}